package com.dlb.andorid.presenter;

import com.dlb.andorid.XAPI;
import com.dlb.andorid.XContract;
import com.dlb.andorid.XPresenter;
import com.dlb.andorid.XServerMsg;

import java.util.HashMap;

public class ReChargePresenter extends XPresenter {

	XContract.IRechargeView iView;

	public ReChargePresenter(XContract.IRechargeView iView) {
		super(iView);
		this.iView = iView;
	}

	public void recharge(int typex, float recharge_money) {
		mModel.recharge(typex, recharge_money);
	}



	@Override
	public void onDataSuccess(int vocational_id, HashMap<String, Object> exData, Object data) {
		super.onDataSuccess(vocational_id, exData, data);
		switch (vocational_id) {
			case XAPI.GET_RECHARGE_VOCATIONAL_ID:
				iView.getRechargeSuccess((XServerMsg) data);
				break;
		}
	}
}
